<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 扩展知识
    
    var num = 17
    console.log(num.toString())
    console.log(num.toString(16)) // 把十进制17转换成16进制的字符串

    var num1 = 101
    // parseInt的第二个参数是把数字作为多少进制来转换，默认值为10
    console.log(parseInt(num1, 2)) // 把num1当作2进制来转换，转换的结果是10进制

  </script>
</body>
</html>